import request from '@/utils/request'

// 查询房屋列表
export function listHouns(query) {
  return request({
    url: '/my/houns/list',
    method: 'get',
    params: query
  })
}

// 查询房屋详细
export function getHouns(id) {
  return request({
    url: '/my/houns/' + id,
    method: 'get'
  })
}

// 新增房屋
export function addHouns(data) {
  return request({
    url: '/my/houns',
    method: 'post',
    data: data
  })
}

// 修改房屋
export function updateHouns(data) {
  return request({
    url: '/my/houns',
    method: 'put',
    data: data
  })
}

// 删除房屋
export function delHouns(id) {
  return request({
    url: '/my/houns/' + id,
    method: 'delete'
  })
}
